package net.sk.china.city.mapper;

import java.math.BigDecimal;
import java.util.List;
import java.util.Optional;

import net.sk.china.city.domain.ArActivity;
import net.sk.china.city.domain.dto.activity.ActivitySearchDTO;
import net.sk.china.city.domain.dto.analyse.WorkHourItem;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;

/**
 * 活动Mapper接口
 * 
 * @author ruoyi
 * @date 2024-04-07
 */
@Mapper
public interface ArActivityMapper 
{
    /**
     * 查询活动
     * 
     * @param pkId 活动主键
     * @return 活动
     */
    public ArActivity selectArActivityByPkId(Long pkId);

    /**
     * 查询活动列表
     * 
     * @param activitySearchDTO 活动
     * @return 活动集合
     */
    public Page<ArActivity> selectArActivityList(ActivitySearchDTO activitySearchDTO);

    /**
     * 新增活动
     * 
     * @param arActivity 活动
     * @return 结果
     */
    public int insertArActivity(ArActivity arActivity);

    /**
     * 修改活动
     * 
     * @param arActivity 活动
     * @return 结果
     */
    public int updateArActivity(ArActivity arActivity);

    /**
     * 删除活动
     * 
     * @param pkId 活动主键
     * @return 结果
     */
    public int deleteArActivityByPkId(Long pkId);

    /**
     * 批量删除活动
     * 
     * @param pkIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteArActivityByPkIds(Long[] pkIds);

    /**
     * 删除活动的岗位
     *
     * @param jobId 需要删除的活动岗位的id
     * @return 删除条数
     *
     * */
    int deleteJobByJobId(Long jobId);

    long countActivity(String platformId);

    long sumWorkHour(String platformId);

    int passActivity(Long activityId);

    int denyActivity(Long activityId);

    List<Long> getToBeCompleteActivity();

    int endSignup();

    int completeActivity(Long activityId);

    Page<ArActivity> selectActivityPageForBigScreen(ActivitySearchDTO activitySearchDTO);

    Page<WorkHourItem> selectWorkHourItemPage();

    Optional<BigDecimal> thisDayTotalWorkHour();

    Optional<BigDecimal> thisWeekTotalWorkHour();

    Optional<BigDecimal> thisMonthTotalWorkHour();
}
